package org.ucas.faker.web.utils.fishbone;

public class Line {
    private double[] startPoint;
    private double[] endPoint;
    private double width = 2.0;
    private String color = "#3398DB";

    public Line(){
        this.startPoint = new double[]{0.0, 0.0};
        this.endPoint = new double[]{0.0, 0.0};
    }

    public double[] getStartPoint() {
        return startPoint;
    }

    public Line setStartPoint(double[] startPoint) {
        this.startPoint = startPoint;
        return this;
    }

    public void setColor(String color) {
        this.color = color;
    }

    public String getColor() {
        return color;
    }

    public double[] getEndPoint() {
        return endPoint;
    }

    public Line setEndPoint(double[] endPoint) {
        this.endPoint = endPoint;
        return this;
    }

    public double getWidth() {
        return width;
    }

    public Line setWidth(double width) {
        this.width = width;
        return this;
    }

    public void print(){
        System.out.println("start: ("+startPoint[0]+", "+startPoint[1]+")  " +
                           "end: ("+endPoint[0]+", "+endPoint[1]+")   " +
                           "width="+width);
    }
}
